home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Magazine Extra 1998 Summer: The Perfect PC
/
PC Magazine Extra - The Perfect PC - Summer 1998 Vol 6 #2.iso
/
dwzdika
/
1508
/
nuserial.bat
< prev
next >
Wrap
DOS Batch File
|
1979-12-31
|
940b
|
31 lines
@ECHO OFF
IF '%1'=='' GOTO Syn
SET Opt=
FOR %%v IN (a A a: A:) DO IF '%1'=='%%v' SET opt=0
FOR %%v IN (b B b: B:) DO IF '%1'=='%%v' SET opt=1
::Use on hard disks disabled by default.
::FOR %%v IN (c C c: C:) DO IF '%1'=='%%v' SET opt=2
::FOR %%v IN (d D d: D:) DO IF '%1'=='%%v' SET opt=3
IF '%opt%'=='' GOTO Syn
ECHO L 0 %opt% 0 1 > t$e$m$p$
ECHO E 26 29 %5 %4 %3 %2 >> t$e$m$p$
ECHO w 0 %opt% 0 1 >> t$e$m$p$
ECHO q >> t$e$m$p$
DEBUG < t$e$m$p$ > nul
DEL t$e$m$p$
SET opt=
FOR %%v IN (a b c d A B C D) DO IF '%1'=='%%v' SET opt=:
ECHO Serial number changed for drive %1%opt%
DIR %1%opt% | FIND "Serial Number is"
SET opt=
GOTO End
:Syn
ECHO Syntax: NUSERIAL d: xx xx xx xx
ECHO where d: is the drive to get a new serial number
ECHO and xx xx xx xx are the eight hexadecimal digits
ECHO ordered as desired i the serial number
ECHO Example: NUSERIAL a: 12 34 AB CD yields serial number 1234-ABCD
:End